// Fill out your copyright notice in the Description page of Project Settings.


#include "StateMachine/PlayerState/DashState.h"

#include "Core/Character2D.h"
#include "StateMachine/StateMachine.h"
#include "StateMachine/PlayerState/IdleState.h"

void UDashState::Enter()
{
	Super::Enter();
	UE_LOG(LogTemp, Warning, TEXT("UDashState::Enter"));
	Character->PlayAnimation(FName("Dash"));
	DashDuration= Character->GetDashTime();
	Character->DashStart();
}

void UDashState::Exit()
{
	Super::Exit();
	UE_LOG(LogTemp, Warning, TEXT("UDashState::Exit"));
}

void UDashState::Tick(float Delta)
{
	Super::Tick(Delta);
	Character->DashStart();
	if (DurationTime > DashDuration)
	{
		StateMachine->SwitchState(UIdleState::StaticClass());
	}
}

void UDashState::InputSignal(EInputSignal Signal, const FInputActionValue& Value)
{
	Super::InputSignal(Signal, Value);



}
